import { IToolTipItem } from "../../../../../com/mui/manager/IToolTipItem";
import { ToolTipsManager } from "../../../../../com/mui/manager/ToolTipsManager";
type int = number;
//class WXToolTipSprite
    
    export  class WXToolTipSprite /* flash.display.Sprite */ implements IToolTipItem
    {
        constructor(arg1: int, arg2: int)
        {
            
            this._width = arg1;
            this._height = arg2;
            this.initUI();
            this.cacheAsBitmap = true;
            return;
        }

        protected initUI(): void
        {
            graphics.clear();
            graphics.lineStyle(2, 0, 0);
            graphics.beginFill(0, 0);
            graphics.drawRect(0, 0, this.width, this.height);
            graphics.endFill();
            return;
        }

        public /* override */ get width(): number
        {
            return this._width;
        }

        public /* override */ get height(): number
        {
            return this._height;
        }

        public get toolTipData()
        {
            if (this.toolTipDataFunction != null) 
            {
                return this.toolTipDataFunction();
            }
            return this._tooltipData;
        }

        public set toolTipData(arg1)
        {
            if (arg1 == null || arg1 == "") 
            {
                ToolTipsManager.unregister(this);
            }
            else 
            {
                ToolTipsManager.register(this);
            }
            this._tooltipData = arg1;
            return;
        }

        public set toolTipDataFunction(arg1: Function)
        {
            if (arg1 != null) 
            {
                ToolTipsManager.register(this);
            }
            else 
            {
                ToolTipsManager.unregister(this);
            }
            this._toolTipDataFunction = arg1;
            return;
        }

        public get toolTipDataFunction(): Function
        {
            return this._toolTipDataFunction;
        }

        /* internal */ /* var */_width: int;

        /* internal */ /* var */_height: int;

        /* internal */ /* var */_tooltipData;

        protected /* var */_toolTipDataFunction: Function;
    }
